home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48_1
/
lissajou
< prev
next >
Wrap
Text File
|
1995-03-31
|
3KB
|
89 lines
Article 1537 of comp.sys.handhelds:
Path: en.ecn.purdue.edu!pur-ee!mentor.cc.purdue.edu!purdue!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!mit-eddie!ll-xn!rsteele
From: rsteele@XN.LL.MIT.EDU (Rob Steele)
Newsgroups: comp.sys.handhelds
Subject: HP-48 Movie
Message-ID: <1753@xn.LL.MIT.EDU>
Date: 15 Mar 90 21:50:41 GMT
Reply-To: rsteele@LL-XN.ARPA.ll.mit.edu (Rob Steele)
Organization: MIT Lincoln Laboratory
Lines: 75
The following code plots a series of lissajous and animates them.
It is possible to see the resulting figure in about eleventy-
two different ways: cylindrical or flat, rotating or oscillating
about a horizontal or vertical axis, moving toward you or
away, moving to the left or to the right, or just wobbling.
I call the program LLL for Lincoln Lab Lissajous since the lissajous
is our logo. To work it, download or enter it and press the GEN
button. It will run for a few minutes and beep when it's through.
Then press the SHO button and watch. Finally, press any key to quit.
If you have trouble seeing the image in different ways, try focusing
on a single intersection in the plot as it moves. Pretend that the
point is in front as it moves in one direction and in back when it
goes the opposite way. Once you get that to work, reverse directions.
Rob Steele
rsteele@xn.ll.mit.edu
All orginizations that are not actually right-wing will over time
become left-wing.
-- O'Sullivan's Law
LLL -- 609.5 bytes, # 93CEh checksum
%%HP: T(3)A(D)F(.);
DIR
GEN \<<
@ Generates a list of graphic objects and
stores them in IMAGES.
@
RCLF DEG
0 'IMAGES' STO
30 90 FOR i
i 'Z' STO
ERASE DRAW PICT RCL
10 STEP
7 \->LIST 'IMAGES' STO
STOF
1250 1 BEEP
\>>
SHO \<<
@ Displays the graphic objects in IMAGES in rapid
succession.
@
IMAGES SIZE \-> n
\<<
ERASE { # 0h # 0h } PVIEW
MEM DROP
WHILE KEY NOT REPEAT
1 n 1 - FOR i
PICT { # 0h # 0h } 'IMAGES' i GET REPL
NEXT
n 2 FOR i
PICT { # 0h # 0h } 'IMAGES' i GET REPL
-1 STEP
END
DROP
\>>
\>>
@ Definition of the lissajous. Set Z to zero to produce the
Lincoln logo.
@
EQ 'SIN(4*x+Z)+COS(3*x)*i'
Z 0
PPAR { (-3,-1) (3,1) { x 0 360 } 0 (10,10) PARAMETRIC Y }
IMAGES 0
END